home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 5 / BOOZ_MAC / BOOZ_2 / LZH.H < prev    next >
Text File  |  1992-07-19  |  846b  |  34 lines

  1. /*$Source: /usr/home/dhesi/booz/RCS/lzh.h,v $*/
  2. /*$Id: lzh.h,v 1.4 91/07/08 11:31:57 dhesi Exp $*/
  3.  
  4. /* Define some things if they aren't defined in header files */
  5. #ifndef CHAR_BIT
  6. # define CHAR_BIT 8
  7. #endif
  8.  
  9. #ifndef UCHAR_MAX
  10. # define UCHAR_MAX 255
  11. #endif
  12.  
  13. /* io.c */
  14.  
  15. extern FILE *arcfile;
  16. extern t_uint16 bitbuf;
  17. #define BITBUFSIZ (CHAR_BIT * sizeof bitbuf)
  18.  
  19. /* encode.c and decode.c */
  20.  
  21. #define MATCHBIT   8    /* bits for MAXMATCH - THRESHOLD */
  22. #define MAXMATCH 256    /* formerly F (not more than UCHAR_MAX + 1) */
  23. #define THRESHOLD  3    /* choose optimal value */
  24. #define PERC_FLAG ((unsigned) 0x8000)
  25.  
  26. /* huf.c */
  27.  
  28. #define NC (UCHAR_MAX + MAXMATCH + 2 - THRESHOLD)
  29.     /* alphabet = {0, 1, 2, ..., NC - 1} */
  30. #define CBIT 9  /* $\lfloor \log_2 NC \rfloor + 1$ */
  31. #define CODE_BIT  16  /* codeword length */
  32.  
  33. extern ushort left[], right[];
  34.